package com.sikaryofficial.system.api.model.att;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.validator.constraints.Length;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author : qinjinyuan
 * @desc : 附件DTO
 * @date : 2023/10/30 14:18
 */
@Setter
@Getter
@ToString
@ApiModel(value = "附件出参", description = "附件出参")
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class AttachmentResp implements Serializable {
    private static final long serialVersionUID = 1L;
    @JsonIgnore
    private Long attachmentId;

    /**
     * 关联对象ID
     */
    @ApiModelProperty(value = "对象ID", example = "1121342345346")
    private Long objectId;

    @ApiModelProperty(value = "附件地址")
    private String url;

    /**
     * 是否为封面, 0-不是，1-是 默认为0
     */
    @ApiModelProperty(value = "是否为封面, 0-不是，1-是 默认为0", example = "0")
    private Integer hasCover;
    /**
     * 描述
     */
    @ApiModelProperty(value = "描述")
    @Length(max = 200, message = "description could not greater than 200")
    private String description;

    /**
     * 宽度(图片附件)
     */
    @ApiModelProperty(value = "宽度(图片附件)")
    private Long width;
    /**
     * 高度(图片附件)
     */
    @ApiModelProperty(value = "高度(图片附件)")
    private Long height;

    /** 播放时长，单位秒 */
    @ApiModelProperty(value = "播放时长，单位秒")
    private BigDecimal duration;

    /** 是否是多媒体, 0-否,1-是；默认否 */
    @ApiModelProperty(value = "是否是多媒体, 0-否,1-是；默认否")
    private Integer hasMedia;
}
